home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / Czarina.dxr / Internal_9_foundation hotspot.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  1.7 KB  |  64 lines

  1. property row, spriteNum
  2. global equal, currentsel, foundation, basecard, godlist
  3.  
  4. on beginSprite me
  5.   row = determinerow()
  6. end
  7.  
  8. on mouseEnter me
  9.   if the mouseDown and (the clickOn <> 0) then
  10.     if sprite(the clickOn).member <> member("empty", "playing cards") then
  11.       if sprite(the clickOn).member <> member("empty", "playing cards") then
  12.         put "1"
  13.         if foundation[row].getcardcount() = 0 then
  14.           if getlist(the clickOn).rank = basecard then
  15.             equal = 1
  16.             currentsel = spriteNum - 11
  17.             put currentsel
  18.             godlist = foundation[row]
  19.           end if
  20.         else
  21.           if foundation[row].getcardcount() > 0 then
  22.             put "1b"
  23.             if (getlist(the clickOn).rankvalue = (foundation[row].getlastcard().rankvalue + 1)) and (getlist(the clickOn).suit = foundation[row].getlastcard().suit) then
  24.               equal = 1
  25.               currentsel = foundation[row].getlastcard().spnum
  26.               godlist = foundation[row]
  27.             else
  28.               if (getlist(the clickOn).rank = "ace") and (foundation[row].getlastcard().rank = "king") and (getlist(the clickOn).suit = foundation[row].getlastcard().suit) then
  29.                 equal = 1
  30.                 currentsel = foundation[row].getlastcard().spnum
  31.                 godlist = foundation[row]
  32.               end if
  33.             end if
  34.           end if
  35.         end if
  36.       end if
  37.     end if
  38.   end if
  39. end
  40.  
  41. on determinerow me
  42.   if spriteNum = 39 then
  43.     return #one
  44.   else
  45.     if spriteNum = 38 then
  46.       return #two
  47.     else
  48.       if spriteNum = 36 then
  49.         return #four
  50.       else
  51.         if spriteNum = 37 then
  52.           return #three
  53.         end if
  54.       end if
  55.     end if
  56.   end if
  57. end
  58.  
  59. on mouseLeave
  60.   equal = 0
  61.   currentsel = 0
  62.   godlist = VOID
  63. end
  64.